import { TResponse } from "./base"

export const returnSuccess = <T>(msg: string, data: T): TResponse<T> => {
  return {
    code: 200,
    success: true,
    msg,
    data,
  }
}

export const returnFail = (code: number, msg: string): TResponse<null> => {
  return {
    code: code,
    success: true,
    msg,
    data: null,
  }
}
